#ifndef SEU_SET_H
#define SEU_SET_H

/* This is meant to implement the mathematical concept of a set: essentially
 * an unordered list of non-repeating data.
 */

typedef struct set_node_t {
   struct set_node_t *left;
   struct set_node_t *right;
   void *data;
} set_node_t;

typedef struct {
   int size;
   set_node_t *root;
   int(*compare)(const void *, const void *);
} set_t;

set_t *newSet(int (*compare)(const void *, const void *));
void setClear(set_t *set);
void setPut(set_t *set, void *object);
int setContains(set_t *set, void *object);
void setRemove(set_t *set, void *object);
int  setIsEmpty(set_t *set);

#endif
